#include "stdafx.h"
#include "list物体朝向插座.h"



using namespace std;








C_插座物体朝向Array1D::C_插座物体朝向Array1D(string name) :C_插座基类(name, E_插座类型::e_插座Type_bl物体朝向) {
	m_Value = { 0 };
}

C_插座物体朝向Array1D::~C_插座物体朝向Array1D()
{
}

void* C_插座物体朝向Array1D::f_getData() {
	C_插座基类* socket = f_getLinkOutSocket();
	if (socket) {
		if (socket->m_Type == E_插座类型::e_插座Type_bl物体朝向) {
			return dynamic_cast<C_插座物体朝向Array1D*>(socket)->f_getData();
		}
	}
	return &m_Value;
}

void C_插座物体朝向Array1D::f_setData(void* data, int64 ID) {
	m_Value = *((S_物体朝向修改器数据*)data);
}

PyObject* C_插座物体朝向Array1D::f_bl_传入数据(PyObject* bl_data)
{
	return nullptr;
}

PyObject* C_插座物体朝向Array1D::f_输出_bl数据(PyObject* bl_data) {
	auto& value = *DEF_转换为插座物体朝向Array1D插座数据(this);

	PyObject* data = PyList_New(5);

	PyList_SetItem(data, 0, value.m_目标物体);
	PyList_SetItem(data, 1, value.m_轴向);
	PyList_SetItem(data, 2, value.m_上方向);
	PyList_SetItem(data, 3, value.m_目标Z轴);
	PyList_SetItem(data, 4, value.m_影响系数);

	return data;
}

void C_插座物体朝向Array1D::f_resize(uint32 size)
{
}
